<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="header.jsp" %>
	<style>
		.del{
		background-color:black;
		}
	</style>
<head>
<title>收款</title>
</head>
	<script type="text/javascript">
	(function(){
		/**
		* 找零
		*/
		/*function OddChange(container,options){
			this.init(container,options);
		}
		OddChange.prototype.init = function(container,options){
			this.container = container;
			this.options = {"input":"#bt3"};
			this.options = $.extend(this.options,options);
			this.onEvents();
		}
		OddChange.prototype.onEvents=function(){
			var self=this;
			$(this.container).click(function(){
				var npm=$("#bt1").val();
				var apm=$("#bt2").val();
				var oc=$("#bt3").val();
				 if(npm!=null&&npm!=""){
			            if(apm!=null&&apm!=""){
			                oc=$("#bt3").val(parseFloat(apm)-parseFloat(npm));
			            }else{
			            oc=$("#bt3").val(0);
			        }
				$(self.options.input).val(parseFloat(oc));				
			})
		}
		var oddChange = new OddChange("#paymentLink",{});
	})();
	
	 </script>
     <body>
        <div class="container">
             <div style="width:100%;height:480px;padding:0px;overflow:hidden">
                        <div>
                        <label>应收款</label>
                        <input id="bt1" name="neededpayment" value="" class="easyui-validatebox"/>
                        </div>
                        <div>
                        <label>实付款</label>
                        <input id="bt2" name="actualpayment" vaule="" class="easyui-validatebox" data-options="required:false" />
                       </div>
                        <div>
                       <a id="paymentLink" class="easyui-linkbutton">找零</a>                     
                       <input id="bt3" type="text" name="oddchange" class="easyui-validatebox" style="width:165px" data-options="required:false" /><p>
                        </div>
                       <a href="/fleshPos_kingda/payment.jsp" id="submit" class="easyui-linkbutton" style="width:88px;height:auto">确认支付</a>    
                       <a href="/fleshPos_kingda/saleorder_add.jsp" class="easyui-linkbutton" style="width:88px;height:auto">返回</a><p>     
            </div>
		</div>
    </body>
</html>